//
//  YSReadHelper.h
//  YSBookRead
//
//  Created by MOLBASE on 2018/11/8.
//  Copyright © 2018年 YangShen. All rights reserved.
//

#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>

@interface YSReadHelper : NSObject

/// 截屏 无view截window
+ (UIImage *)screenCapture:(UIView *)view;

/**
 获取当前时间

 @param dateFormat 时间格式
 @return 格式化字符串
 */
+ (NSString *)getCurrentTimerString:(NSString *)dateFormat;

/// md5加密
+ (NSString *)md5:(NSString *)string;

/// 网址链接处理
+ (NSString *)encodeToPercentEscapeString:(NSString *)input;

/// 格式化章节内容
+ (NSString *)formartChpaterContent:(NSString *)chapterContent;

/// 日期格式化
+ (NSString *)getUpdateStringWith:(NSDate *)date;

// Color -> Image
+ (UIImage *)imageWithColor:(nonnull UIColor *)color size:(CGSize)size;

@end
